package com.tudouji.project.harvest.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.flow.service.pojo.BasePojo;
import com.flow.service.pojo.flow.FlowTempNode;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 合同管理对象 procurementcontract
 *
 * @author tudouji
 * @date 2021-04-07
 */
@Data
public class Procurementcontract extends BasePojo
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String guid;

    /** 批次id */
    private String batchguid;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 甲方 */
    @Excel(name = "甲方")
    private String parta;

    /** 乙方 */
    @Excel(name = "乙方")
    private String partb;

    private Long supplierId;
    private String supplierName;

    /** 采收地块 */
    @Excel(name = "采收地块")
    private String arealandid;

    /** 单价(元/吨) */
    @Excel(name = "单价(元/吨)")
    private BigDecimal price;

    /** 抽检比率 */
    private BigDecimal spotcheckrate;

    /** 扣杂率 */
    @Excel(name = "扣杂率")
    private BigDecimal discountrate;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdate;

    /** 创建人 */
    @Excel(name = "创建人")
    private String operatorid;

    /** 最后更新时间 */
    private Date lastupdate;

    /** 合同签订时间 */
    private Date starttime;

    /** 规格 */
    private String specificationid;

    /** 质检方式 */
    private String qatype;

    /** $column.columnComment */
    private BigDecimal soilchkrate;

    /** $column.columnComment */
    private BigDecimal unqualifiedchkrate;

    /** 扣杂方式 */
    @Excel(name = "扣杂方式")
    private Integer deducttype;

    /** 结算净重规则:1发货过磅、2到货过磅 */
    private String setlwgtype;

    /** $column.columnComment */
    private String organizationid;

    /** 扣杂标准 */
    private Integer isdiscount;

    /** 产品 */
    @Excel(name = "产品")
    private String productguid;

    /** 支付方式 */
    private Integer paymentmethod;

    /** 包装重量 */
    private BigDecimal wghtperpkg;

    /** 流程id */
    private String flowid;

    /** 入库库房id */
    private String srguid;
    private Long strid;

    /** 库房名字 */
    private String srname;

    /** 编号 */
    @Excel(name = "编号")
    private String code;

    /** 合同状态 */
    private Integer status;

    /** 部门id */
    private String departid;

    /** 部门名字 */
    private String departname;

    /** 质检标准id */
    private String qamainid;
    /** 质检标准类型 1- 商品薯 2-淀粉薯 */
    private Integer qamainType;


    /** 1-地头采收 2-库房采收 */
    private Integer type;

    /** 农户库房id */
    private String farmerstoreid;

    /** 农户库房 */
    private String farmerstore;

    /** 规格id */
    private String spguid;

    /** 规格 */
    @Excel(name = "规格")
    private String specificationname;

    /** 开户行 */
    private String bank;

    /** 银行账号 */
    private String bankcode;

    /** 1-订单户，2-临采 */
    private Integer harvestType;

    /** 所属系列,字典定义130 */
    private Integer series;

    /** 所属系列名称 */
    private String seriesname;

    /** 所属区域,字典定义131 */
    private Integer region;

    /** 所属区域名称 */
    private String regionname;

    private String deducttypeName;
    private String statusname;
    private String qaname;
    private String productname;
    private String arealandname;
    private String partbname;
    private String operator;
    private String isdiscountName;

    private List<Contstandard> standars;
    private Integer saveFlag;//账户信息保存标识
    private String stockunit;
    private Long stockunitid;

    private List<FlowTempNode> nodes;
    private Integer[] stats;
    private String[] deptIds;
    private String search;
    private String keyword;
    private BigDecimal weight;

    private Integer saleOrStore;//1 – 地头直销 2 – 采收入库
    private String saleOrStoreName;

    /** 价格确认方式1.入库前确认2.入库后确认 */
    private Integer priceMethod;
    private String priceMethodName;

    @Override
    public void prepareForProcess(){
        setBusTable("procurementcontract");
        setPlatformId(strid);
    }
}
